#include <iostream>
#include "Log_back.hpp"

int main()
{
    // //按照不同的日志等级分文件进行打印
    // Log lg(ClassFile);
    // lg.LOG(DEBUG, "this is a log message: %d, %lf\n", 1, 3.14);
    // lg.LOG(INFO, "this is a log message: %d, %lf\n", 1, 3.14);
    // lg.LOG(WARN, "this is a log message: %d, %lf\n", 1, 3.14);
    // lg.LOG(ERROR, "this is a log message: %d, %lf\n", 1, 3.14);
    // lg.LOG(FATAL, "this is a log message: %d, %lf\n", 1, 3.14);

    // //默认打印到显示器上
    // Log lg2;
    // lg2.LOG(ERROR, "this is a log message: %d, %lf\n", 2, 3.14);
    // lg2.LOG(FATAL, "this is a log message: %d, %lf\n", 2, 3.14);

    //将所有的日志内容打印到一个文件中
    Log lg3(OneFile);
    lg3.LOG(DEBUG, "this is a log message: %d, %lf\n", 3, 3.14);
    lg3.LOG(INFO, "this is a log message: %d, %lf\n", 3, 3.14);
    lg3.LOG(WARN, "this is a log message: %d, %lf\n", 3, 3.14);
    lg3.LOG(ERROR, "this is a log message: %d, %lf\n", 3, 3.14);

    return 0;
}